package com.woniu.HisHospitalizationApiImpl;

import com.woniu.HisHospitalizationApi.HisConsumptionApi;
import com.woniu.dto.HisBedDto;
import com.woniu.dto.HisConsumptionDto;
import com.woniu.dto.PageDTO;
import com.woniu.exception.DIYException;
import com.woniu.mapper.HisConsumptionMapper;
import com.woniu.model.HisConsumption;
import com.woniu.param.HisConsumptionAddParam;
import com.woniu.param.HisConsumptionParam;
import com.woniu.service.IHisConsumptionService;
import com.woniu.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RestController;
import sun.rmi.runtime.Log;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@Slf4j
public class HisConsumptionApiImpl implements HisConsumptionApi {
    @Resource
    private HisConsumptionMapper hisConsumptionMapper;
    @Resource
    private IHisConsumptionService hisConsumptionService;


    @Override
    public Result<PageDTO<HisConsumptionDto>> getHisConsumptionBy(HisConsumptionParam hisConsumptionParam) {
        return hisConsumptionService.getHisConsumptionBy(hisConsumptionParam);
    }

    @Override
    public Result<Boolean> deletegetHisConsumptionById(ArrayList<Integer> id) {
       return hisConsumptionService.deletegetHisConsumptionById(id);
    }

    @Override
    public Result<HisConsumptionDto> updateHisConsumption(HisConsumptionParam hisConsumptionParam) {
       return hisConsumptionService.updateHisConsumption(hisConsumptionParam);
    }

    @Override
    public Result<HisConsumptionDto> addHisConsumption(HisConsumptionAddParam hisConsumptionAddParam) {
       return hisConsumptionService.addHisConsumption(hisConsumptionAddParam);
    }
}
